package main.java.content.enemy;

import main.java.auxiliary.Audio;
import main.java.auxiliary.CommonUtils;
import main.java.auxiliary.ElementBean;
import main.java.base.IElement;
import main.java.content.enemy.base.CountEnemy;
import main.java.content.enemy.base.IEnemy;

/**
 * @author 吴浩华 陈逸然 吴畏
 * @Description: 疯狂的敌人
 * @date 2021/6/11
 */
@IEnemy(probability = 30, number = 1, score = 2000)
@IElement(leftImage = "java1.png", rightImage = "java1.png",height = 50,width =40,
        defense = 100, rewardScore = 1000)
public class CrazyEnemy extends CountEnemy {

    public CrazyEnemy(int x, int y) {
        super(x, y);
        Audio.SinisterSmile.play();
    }

    @Override
    protected void doSomething() {
        this.xSpeed = CommonUtils.nextInt(-10, 30);
        ElementBean.Substance.getService().add(new lab(this));//添加lab
    }

    @Override
    protected int getCountMax() {
        return 100;
    }
}
